//
//  HSDSpidermanNetworkManager.h
//  GoldenCard
//
//  Created by 正合适 on 2018/3/22.
//  Copyright © 2018年 合时代. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworking.h>

// 成功回调Block
typedef void(^SuccessBlock)(id responseObj);
// 失败回调Block
typedef void(^ErorrBlock)(id responseObj);

typedef NS_ENUM(NSUInteger, RequestType) {
    RequestType_Get,
    RequestType_Post,
};


@interface HSDSpidermanNetworkManager : NSObject
+ (instancetype)instance;
/**
 请求数据

 @param type <#type description#>
 @param url <#url description#>
 @param params <#params description#>
 @param successBlock <#successBlock description#>
 @param errorBlock <#errorBlock description#>
 */
- (void)requestWithType:(RequestType)type url:(NSString *)url params:(id)params success:(SuccessBlock)successBlock error:(ErorrBlock)errorBlock;

- (void)requestWithType:(RequestType)type url:(NSString *)url params:(id)params header:(NSDictionary *)headerDic success:(SuccessBlock)successBlock error:(ErorrBlock)errorBlock;
@end
